AM
Section: User Commands (1)
Updated: HP-UX
Index
Return to Main Contents
NAME
am - Loan amortization schedule generator
SYNOPSIS
am
[-n number] [-a amount] [-i interest]
[-p payment] [-s start] [-l list] [-b]
[-I month:rate] [-E month:amount] [-U month:amount]
[-D delta] [-f]
DESCRIPTION
Am is one of many available loan amortization schedule generators.
What makes am unique is the aesthetically pleasing output (right
justified values with commas), and its ability to handle a variety of special
cases during the life of the loan. These include:
-
- short/long month
-
The ability to handle loans that have a different starting and payment date.
This is useful for cases where the loan doesn't close on the
first of the month, but payments will be due on the first.
- missed payments
-
Handles months where no payment was made and the unpaid interest is rolled
back into the principal.
- extra principal
-
For cases when an extra principal payment is made in addition to a month's
regular payment. For example, one month you receive two checks: one for the
month's normal payment, and a second as a principal payment.
- special payment
-
For when a month's payment is some value other than normal. For example, a low
payment that only covers part of the interest (the rest is rolled back in) and
none of the principal.
- ARM (Adjustable Rate Mortgage)
-
Handles changes in the interest rate during the life of the loan.
This makes am especially useful for preparing schedules for existing
loans that have had some unusual activity in their life-to-date, or new loans
if you know that there will be some special activity during the life of the
loan.
COMMAND LINE ARGUMENTS
The following are the definitions of the run-time arguments:
- -n number
-
The number of payments which defines the life of the loan. The value may be:
-
- =0
-
Loan runs till paid.
- >0
-
Loan runs N months.
- <0
-
Loan runs N years (-e-2 equals two years or 24 months).
- -a amount
-
The actual principal amount of the loan (<= 999,999,999.99).
- -i interest
-
The rate of interest in percent (-i10 equals 10%, i.e. 0.10).
- -p payment
-
The amount of principal-plus-interest payment per month. If zero is entered
am will calculate the payment amount for the given loan length, amount,
and interest.
- -s start
-
The date of the first payment in the form MM-DD-YY.
- -l list
-
How much of the schedule to print. If the number of payments is less than
the life of the loan, am assumes a balloon payment of principal in the
last month. The value may be:
-
=0
List all payments.
- >0
-
List N months of payments.
- <0
-
List N years of payments (-e-2 equals two years or 24 months).
- -b
-
If at the time of the final payment there is principal still to be payed,
make the final payment a balloon payment so the loan will be totally payed off.
- -I month:rate
-
Allows the specification of up to 128 changes of the interest rate. This
allows am to create a schedule for an ARM (Adjustable Rage Mortgage).
The new rate is defined in the same way as the initial rate in the -i
option.
- -E month:amount
-
Allows the specification of up to 128 months of special principal payments.
These special payments are for months where a non-standard principal payment
amount was made. The amount may be defined as:
-
- >0
-
When an extra principal payment was made in addition to the normal payment
for that month (-e1:500 means the normal payment was made plus an
additional payment of $500).
- <0
-
An amount to be added to the unpaid principal. This could be due to legal
fees, late fees, or other penalties that roll into the note.
- -U month:amount
-
Allows the specification of up to 128 months of unusual payments. These
payments are when a value other than the standard payment due for that month
was made. The amount may be defined as:
-
- =0
-
When no payment was made for that month. The interest is rolled back into
the outstanding principal. Note that one might also define a -e:-value
for the same month if a missed payment resulted in a penalty.
- >0
-
When a payment amount other than the standard amount was made. The payment
will be applied first to interest and then to principal. If there is unpaid
interest for the month, it will be rolled into the principal (-e1:200
means that only $200 was paid which could be more or less that the
required payment for that month).
- -D delta
-
The number of days to add or subtract from the first month when the closing
date is not the same as the payment date. For example, if the payment date
is the first of the month, but closing was the fifth making the first month
four days short, the parameter to reflect this would be: -D-4.
- -f
-
Output the schedule with nroff(1) formatting commands. The resulting
schedule will look much nicer and be easier to read. Useful since many
unix-like machines should have nroff(1) for use with the man pages.
Any required values not provided will be asked for as the program runs.
All values have defaults provided.
Particular attention needs to be given to the three monthly special case
options: -I, -E, and -U. Use the -I to change the
interest rate being used. The supplied rate will be used from the
specified month forward (unless changed again). Use the -E to make
some modification to the principal payment for a given month. A value
>0 means an extra amount to apply to principal, a value <0 means some special
penality or the like is to be added to the principal. Use the -U to
specify that some value other that the standard payment was made for the
specified month. This could be =0 if the payment was missed, or >0 if a
payment more or less that the standard was made.
Note: since the minus sign indicates (-) a command line argument,
negative values will be interpreted as new arguments. The way to avoid this it
to NOT put spaces between the argument name and argument value. For example,
use -n-5 not -n -5 to specify a length of five years (60 months).
SOURCE CODE
If the source code for am is available there are a number of additional
special cases that the code can be modified to handle. The source for am
should be found in the file: am.c.
The first is to change the size of the arrays that hold the special case
information (the -I, -E, and -U options). If there are more
than the default number of cases (128), the define for ARRAY_SIZE may be
modified.
Most interest calculations round to the nearest penny. If there is a case
where it needs to always round up or always round down, search for the string
"INTEREST" (all upper case) in the source file. The three possible rounding
cases are there and the proper one can be un-commented and used.
Finally there may be some special case that just can't be handled with the
provided options. Search for the string "SPECIAL" to find a block of code
where special case calculations can be done for a particular month. This is
where modifications were made before the -I, -E, and -U
options existed. It should not be needed anymore, but is there just-in-case.
The default is to separate dates with a dash '-', as in 12-14-56. Changing
the definition for the separator 'SEP' to a slash '/' will get 12/14/56.
EXAMPLE
The following will run a simple loan sending the formatted output to more(1)
for viewing.
-
am -n-5 -a10000 -i10 -p0 -s1-1-92 -l0 -f | nroff | more
ENHANCEMENTS
The most obvious enhancement is a way to handle late payment penalties. Often
a loan will have a penalty (say 10% of the payment amount) if the payment is
not received on time. The reason this has not been added to am is
because there are so many ways this late fee can be handled: is it considered
interest (for the time between the due date and the end of the grace period),
should it be recorded on the schedule, if not paid is it rolled back into the
principle (as unpaid interest is), etc. It is possible to use the -E
option to cause a late payment to be rolled back into the note, but that is
the only case handled at this time.
Other priority enhancements include:
-
- 1
-
Better formatted output (like troff tables) and different formatters (like
PostScript).
- 2
-
Allow dates as well as month numbers for the various parameters.
- 3
-
Accept loan definition input from a file in addition to the command line.
BUGS
Probably.
AUTHOR
Copyright 1992, 1993 Brett K. Carver brett@sr.hp.com
FINE PRINT
This software is presented as is, with no warranties expressed or implied,
including implied warranties of merchantability and fitness. In no event shall
the authors, their institutions, or any subsequent distributors be liable for
any special, direct, indirect or consequential damages whatsoever resulting
from loss of use, data or profits, whether in an action of contract, negligence
or other tortious action, arising out of or in connection with the use or
performance of this software.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- COMMAND LINE ARGUMENTS
-
- SOURCE CODE
-
- EXAMPLE
-
- ENHANCEMENTS
-
- BUGS
-
- AUTHOR
-
- FINE PRINT
-
This document was created by
man2html,
using the manual pages.
Time: 16:15:04 GMT, September 10, 2022